<%@ tag language="java" pageEncoding="UTF-8" body-content="scriptless" trimDirectiveWhitespaces="true"%>
<%@ attribute name="id" type="java.lang.String" description="dialog id"%>
<%@ attribute name="size" type="java.lang.String" description="设置模态框的大小，可选值：modal-lg(大对话框，宽度：900px)，modal-sm(中等大小，宽度：300px)，modal-fullscreen(全屏)"%>
<%@ attribute name="width" type="java.lang.String" description="设置模态框的宽度，单位：em/px"%>
<%@ attribute name="height" type="java.lang.String" description="设置模态框的高度，单位：em/px"%>
<%@ attribute name="backdrop" type="java.lang.String" description="是否允许点击遮罩层关闭对话框,default = static,其它值：true/false"%>
<div class="modal fade" id="${id}" tabindex="-1" role="dialog" aria-hidden="true" data-appendToBody="true" 
	data-dialog='true'>
	<div class="modal-dialog ${size}">
		<div class="modal-content">
			<jsp:doBody/>
		</div>
	</div>
</div>
<script type="text/javascript">
(function(){
	var backdrop = "${backdrop}"==""?"static":"${backdrop}";
	$("#${id}").attr("data-backdrop",backdrop);
	
	var width = "${width}";
	var height = "${height}";
	if(width)
		$("#${id} .modal-dialog").css('width',width);
	if(height)
		$("#${id} .modal-dialog").css('height',height);
})();
</script>
